/*
 * @Descripttion: 
 * @version: 
 * @Author: 
 * @Date: 2019-10-11 10:14:07
 */
import https from "../http";
import qs from "qs";
const TZD_API = process.env.NODE_ENV == "development" ? "/tzdUrl" : `${process.env.JZT_API}`;
const WSB_API = process.env.NODE_ENV == "development" ? "/wsbUrl" : `${process.env.JZT_API}`;
const JZT_API = process.env.NODE_ENV == "development" ? "/jztUrl" : `${process.env.JZT_API}`;

const processManagementApi = {
  // TZD童章德API--------------------------------------------  
  // 基本信息查询: 流程节点表数据查询 + 父流程下拉列表
  tableData: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcess/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 点击下一步保存流程基本信息 
  createCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcess/createCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 父节点下拉列表 |  上游节点下拉列表  参数{busiProceId:'父流程下拉列表中的父流程id'}
  findCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcessNode/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 添加流程节点!
  createCataInsert: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcessNode/createCataInsert`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 根据版本ID查询流程基本信息
  findCataDetailByVersionId: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcess/findCataDetailByVersionId`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 版本id查询 该流程所有的节点
  ProcessNodefindCataByVersionId: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcessNode/findCataByVersionId`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 根流程id 该流程所有版本
  findCataByVersionId: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcess/findCataByVersionId`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 根据节点查询---------------业务流程详情      
  // 获取节点基本信息详情
  findCataDetail: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcessNode/findCataDetail`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 获取业务流节点执行单位
  BusinessExecDepartmentfindCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessExecDepartment/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 信息化系统查询
  BusinessInfoSystemfindCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessInfoSystem/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 上游节点查询
  BusinessUpstreamNodefindCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessUpstreamNode/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 输出参数查询查询
  BusinessOutputParamfindCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessOutputParam/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 业务规则查询
  BusinessRulefindCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessRule/findCata`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 根据流程节点删除
  BusinessProcessNodedelCataDel: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcessNode/delCataDel`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 修改流程基本信息
  BusinessProcessupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcess/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 修改[流程节点]基本信息
  BusinessProcessNodeupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessProcessNode/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 增加[流程节点]执行单位
  BusinessExecDepartmentcreateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessExecDepartment/createCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 修改[流程节点]执行单位
  BusinessExecDepartmentupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessExecDepartment/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 修改[流程节点]信息化系统
  BusinessInfoSystemupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessInfoSystem/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 修改[流程节点]上游节点
  BusinessUpstreamNodeupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessUpstreamNode/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 修改[流程节点]输出参数
  BusinessOutputParamupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessOutputParam/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 修改[流程节点]业务规则
  BusinessRuleupdateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessRule/updateCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 新增[流程节点]信息化系统
  BusinessInfoSystemcreateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessInfoSystem/createCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 新增[流程节点]上游节点
  BusinessUpstreamNodecreateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessUpstreamNode/createCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 新增[流程节点]输出参数
  BusinessOutputParamcreateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessOutputParam/createCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 新增[流程节点]业务规则
  BusinessRulecreateCata: function (data) {
    return https({
      url: `${TZD_API}/BusinessRule/createCata`,
      method: 'post',
      headers: {},
      data: data
    })
  },
  // 删除[流程节点]执行单位
  BusinessExecDepartmentdelCataDel: function (data) {
    return https({
      url: `${TZD_API}/BusinessExecDepartment/delCataDel`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 删除[流程节点]信息化系统
  BusinessInfoSystemdelCataDel: function (data) {
    return https({
      url: `${TZD_API}/BusinessInfoSystem/delCataDel`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 删除[流程节点]业务规则
  BusinessRuledelCataDel: function (data) {
    return https({
      url: `${TZD_API}/BusinessRule/delCataDel`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 删除[流程节点]输出参数
  BusinessOutputParamdelCataDel: function (data) {
    return https({
      url: `${TZD_API}/BusinessOutputParam/delCataDel`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // 删除[流程节点]上游节点
  BusinessUpstreamNodedelCataDel: function (data) {
    return https({
      url: `${TZD_API}/BusinessUpstreamNode/delCataDel`,
      method: 'post',
      headers: {},
      params: data
    })
  },
  // WSB王邵斌API--------------------------------------------  
  // --添加执行单位-单位名称下拉列表
  findOrgCatalogTree: function (query) {
    return https({
      url: `${WSB_API}/catalog/findOrgCatalogTree`,
      method: 'get',
      headers: {
        sendKey: "treeData"
      },
      params: query
    })
  },
  // 获取业务密级下拉列表
  queryDictInfoByType : function (query) {
    return https({
      url: `${WSB_API}/dict/queryDictInfoByType`,
      method: 'get',
      headers: {},
      params: query
    })
  },
  // JZT姜子涛API----------------------------------------------
  // --获取系统名称下拉列表
  findAllSys: function (query) {
    return https({
      url: `${JZT_API}/MetaDataRegister/findAllSys`,
      method: 'get',
      headers: {
        sendKey: "treeData"
      },
      params: query
    })
  },
  // --获取参数名称下拉列表
  MetaDataRegisterfindFileOrIterface: function (query) {
    return https({
      url: `${JZT_API}/MetaDataRegister/findFileOrIterface`,
      method: 'get',
      headers: {
        sendKey: "treeData"
      },
      params: query
    })
  }
}



export default processManagementApi
